import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/StoresSystem',
    component: () => import('../views/StoresSystem.vue'),
    children: [
      {
        path: 'GoodsList/:_id',
        component: () => import('../components/storesSystem/GoodsList.vue'),
      },
      {
        path: 'NewStock',
        component: () => import('../components/storesSystem/NewStock.vue'),
      },
      {
        path: 'ShopsList',
        component: () => import('../components/storesSystem/ShopsList.vue'),
      },
      {
        path: 'FinishedGoods',
        component: () => import('../components/storesSystem/FinishedGoods.vue'),
      },
      {
        path: 'AwaitCheck',
        component: () => import('../components/storesSystem/AwaitCheck.vue'),
      },
      {
        path: 'FinishedGoodsAdd',
        component: () => import('../components/storesSystem/FinishedGoodsAdd.vue'),
      },
      {
        path:"Echarts",
        component: () => import('../components/storesSystem/Echarts.vue')
      },
      {
        path: 'ordersList',
        component: () => import('../components/storesSystem/OrdersList.vue'),
      },
      {
        path: 'addOrders',
        component: () => import('../components/storesSystem/addOrders.vue'),
      },
      {
        path:"uploading",
        component: () => import('../components/storesSystem/Uploading.vue')
      }

    ]
  },
  {//平台管理员系统
    path: '/AdmSystem',
    component: () => import('../views/AdmSystem.vue'),
    children: [
      {
        path: 'Admlist',
        component: () => import('../components/admSystem/AdmList.vue'),
      },
      {
        path: 'AdmShops',
        component: () => import('../components/admSystem/AdmShops.vue'),
      },
      {
        path: 'StoresList',
        component: () => import('../components/admSystem/StoresList.vue'),
      }
    ]
  },
  {//登录
    path: '/login',
    component: () => import('../components/storesSystem/storeslogin.vue')
  },
  {//注册
    path: '/register',
    component: () => import('../components/storesSystem/storesregister.vue')
  },
  {
    //刘磊个人登陆
    path:'/llshops',
    component:() =>import('../views/llsy.vue'),
    children:[
      {
        path:"llsc",
        component:() =>import('../components/llshops/llsc.vue')
      },
      {
        path:"spxq",
        component:() =>import('../components/llshops/spxq.vue')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
